package org.example.design.designmode.flyweight.ticket;

public class Test {
    public static void main(String[] args) {
        ITicket i = TicketFacotry.getTicket("上海虹桥","洛阳龙门");
        i.showInfo("硬座");

        i = TicketFacotry.getTicket("上海虹桥","洛阳龙门");
        i.showInfo("头等舱");

        i = TicketFacotry.getTicket("上海虹桥","郑州");
        i.showInfo("头等舱");
    }
}
